Conventionally, for a character generator used with a dot matrix printer, a dot matrix liquid crystal display, and the like, dots constituting each character are disposed within a matrix, e.g., having 24 dots per column. Data for each character is produced and stored in a non-volatile memory such as a ROM. The data includes information on whether or not there is a print data for each pin of the dot matrix which is the minimum unit in the horizontal direction, i.e., for each dot position in the vertical direction of the character, information on a character design, information on a data format, information on a character code, and the like. Such a character font is called a bit map font.
FIG. 1 illustrates a dot matrix for a conventional character generator wherein a bit map for a Prestige font "A" is formed. As shown in FIG. 1, dots are disposed in the bit map constructed of 24 rows and 31 columns. The 24 rows in one column are grouped in units of four rows, and the data representative of a presence/absence of dot in each unit of four rows is expressed by a hexadecimal number to provide a character data. In this manner, one column can be expressed by 3 byte data.
The hexadecimal data for the dot map shown in FIG. 1 is given in FIG. 2.
Data stored in a ROM includes 31.times.3 byte dot data for 31 columns from 0-th to 30-th columns as well as 3 byte data for a front space, character width, and back space shown in FIG. 3. The stored data is therefore 96 byte data in total.
FIG. 4 is a block diagram showing the concept of an apparatus having such a character generator, the apparatus being built in a printer. In this apparatus, a CPU 1 is connected to a ROM 2 serving as a character generator fixedly storing character information, a RAM 3, a printer mechanism 4, and an I/O interface 5. With such an arrangement, CPU 1 controls the printer mechanism 4 to print dot information read from the character generator ROM 2. A similar arrangement is also applicable to a matrix type display or the like.
Such a conventional data structure requires that a bit map should have all dot data of a matrix including a dot data which is not printed. Although each character has many dots which are not actually printed, the data for such dots must be prepared in the bit map, requiring in a large capacity memory.
Furthermore, a character data read from such a character generator is often modified by expansion, condensation, or emphasis. However, the above-described conventional dot storage scheme prepares character data by separately grouping each character in the vertical direction to obtain its character data. As a result, complicated operation is required to modify a character. For example, in the case of expansion, an OR operation is executed by additionally providing null data for one column. In the case of condensation, an OR operation is executed between data for two columns to delete unnecessary dots.
Such operations are carried out in units of bytes (8 bits) or words (16 bits). Therefore, an expansion by n or a condensation by 1/n becomes more complicated than the case of n=2, resulting in a lower printing speed.
The present invention has been made to solve the above problems. It is an object of the present invention to provide a method of compressing character data in a character generator, capable of reducing a memory capacity and facilitating character modification operations.
It is another object of the present invention to provide a character modifying method capable of facilitating operation.